import React from 'react';
import "@/components/HandOk/index.less";
import { useNavigate, useLocation } from "react-router-dom";
import PageHeaderNew from '@/components/PageHeaderNew';
import { filterPage } from "@/utils";


function IconBox({ image = "/images/handOk.png", header = '注册', topTitle = "注册成功", title = "", navigateUrl = '/' }) {
  const navigate = useNavigate();
  const location = useLocation();

  return (
    <div>
      <PageHeaderNew title={header} goBack={() => navigate(navigateUrl)} />
      <div className='allBgc' >
        <div className='centerBgc'
          style={{ backgroundImage: `url('${image}')` }}
        ></div>
        <div className='centerTitleBig'>{topTitle}</div>
        <div className='backBtn'>
          <div
            onClick={() => {
              // navigate(filterPage(location?.state))
              navigate('/authentication')
            }}
          >去认证</div>
        </div>
      </div>
    </div>

  );
}

export default IconBox;
